package jee.boot.encrypt.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;


/**
 * 数据加密配置
 */
@Configuration
@ConfigurationProperties(prefix = "spring.data-encrypt")
public class DataEncryptConfig {
    /**
     * 开启传输加密
     */
    private Boolean enableEncryptedTransmission = false;
    /**
     * 开启存储加密
     */
    private Boolean enableEncryptedStorage = false;
    /**
     * 系统默认使用AES进行加密,key长度是16位
     */
    private String aesKey="1234567890123456";

    public Boolean getEnableEncryptedTransmission() {
        return enableEncryptedTransmission;
    }

    public void setEnableEncryptedTransmission(Boolean enableEncryptedTransmission) {
        this.enableEncryptedTransmission = enableEncryptedTransmission;
    }

    public Boolean getEnableEncryptedStorage() {
        return enableEncryptedStorage;
    }

    public void setEnableEncryptedStorage(Boolean enableEncryptedStorage) {
        this.enableEncryptedStorage = enableEncryptedStorage;
    }

    public String getAesKey() {
        return aesKey;
    }

    public void setAesKey(String aesKey) {
        this.aesKey = aesKey;
    }
}
